package com.jrx.anytxn.param.dto.investor;

import com.jrx.anytxn.common.constant.RegexConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 出资方额度使用请求实体
 *
 * @author liuyang
 * @date 2020-06-08
 */
@ApiModel(value = "HandleInvestorLimitReq对象", description = "出资方额度使用请求实体")
public class HandleInvestorLimitReq implements Serializable {

    @ApiModelProperty(value = "租戶id",required = true)
    @Size(max=4, message = "租戶id不能超过4位")
    @NotEmpty(message = "租戶id不可空")
    private String tenantId;

    @ApiModelProperty(value = "流水号",required = true)
    @Size(max=32, message = "交易流水号必须小于32位")
    @Pattern(regexp = RegexConstant.ALL_CHARSET_AND_NUMBER, message = "流水号只能是英文字母和数字组成且不可为空")
    @NotEmpty(message = "流水号不能为空")
    private String seqNo;

    @ApiModelProperty(value = "渠道号", required = true)
    @Size(max=32, message = "渠道号不能超过32位")
    @NotEmpty(message = "渠道号不能为空")
    private String channel;

    @ApiModelProperty(value = "出资方id", required = true)
    @Size(max=6, message = "出资方id不能超过6位")
    @NotEmpty(message = "出资方id不能为空")
    private String investorId;

    @ApiModelProperty(value = "产品编号", required = true)
    @Size(max=32, message = "产品编号不能超过32位")
    @NotEmpty(message = "产品编号不能为空")
    private String productId;

    @ApiModelProperty(value = "金额", required = false)
    private BigDecimal amount;

    @ApiModelProperty(value = "额度类型", required = true)
    @NotEmpty(message = "额度类型不能为空")
    private String creditType;

    @ApiModelProperty(value = "使用类型", required = true)
    @NotEmpty(message = "使用类型不能为空")
    private String useType;

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getInvestorId() {
        return investorId;
    }

    public void setInvestorId(String investorId) {
        this.investorId = investorId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getCreditType() {
        return creditType;
    }

    public void setCreditType(String creditType) {
        this.creditType = creditType;
    }

    public String getUseType() {
        return useType;
    }

    public void setUseType(String useType) {
        this.useType = useType;
    }

    @Override
    public String toString() {
        return "HandleInvestorLimitReq{" +
                "tenantId='" + tenantId + '\'' +
                ", seqNo='" + seqNo + '\'' +
                ", channel='" + channel + '\'' +
                ", investorId='" + investorId + '\'' +
                ", productId='" + productId + '\'' +
                ", amount=" + amount +
                ", creditType='" + creditType + '\'' +
                ", useType='" + useType + '\'' +
                '}';
    }
}
